<?php $this->beginContent('application.views.layouts.main'); ?>
<!-- BEGIN LEFT  -->
<div id="left">
    <!-- .user-media -->
    <div class="media user-media hidden-phone">
        <a href="<?php echo url('admin/update', array('id' => user()->id)); ?>" class="user-link">
            <img src="<?php echo user()->getModel()->getAvatarUrl('small') ?>" alt="" class="media-object img-polaroid user-img" width="64" />
        </a>

        <div class="media-body hidden-tablet">
            <h5 class="media-heading"><?php echo h(user()->name) ?></h5>
            <ul class="unstyled user-info">
                <li><a href="<?php echo url('admin/update', array('id' => user()->id)); ?>">Administrator</a></li>
                <li>Last Access : <br/>
                    <i class="icon-calendar"></i> <small><?php echo date('d M H:i') ?></small>
                </li>
            </ul>
        </div>
    </div>
    <!-- /.user-media -->

    <!-- BEGIN MAIN NAVIGATION -->

    <ul id="menu" class="unstyled accordion collapse in">
        <li class="accordion-group <?php echo $this->activeMenu == 'dashboard' ? 'active' : ''; ?>">
            <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#dashboard-nav">
                <i class="icon-dashboard icon-large"></i> Dashboard <span class="label label-inverse pull-right">2</span>
            </a>
            <ul class="collapse" id="dashboard-nav">
                <li><a href="<?php echo url('/dashboard/index') ?>"><i class="icon-angle-right"></i>Quick link</a></li>
                <li><a href="<?php echo url('/dashboard/statistic') ?>"><i class="icon-angle-right"></i>Statistic</a></li>
                <li><a href="<?php echo url('/dashboard/aggregate') ?>"><i class="icon-angle-right"></i>Aggregate reports</a></li>
            </ul>
        </li>
        <li class="accordion-group <?php echo $this->activeMenu == 'ordering' ? 'active' : ''; ?>">
            <a href="<?php echo url('/ordering/step1') ?>">
                <i class="icon-user icon-large"></i> Ordering <span class="label label-inverse pull-right"></span>
            </a>
        </li>
        <li class="accordion-group <?php echo $this->activeMenu == 'order' ? 'active' : ''; ?>">
            <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#order-nav">
                <i class="icon-user icon-large"></i> Orders <span class="label label-inverse pull-right">5</span>
            </a>
            <ul class="collapse" id="order-nav">
                <li><a href="<?php echo url('/order/index',array('status'=>  Order::STATUS_UNASSIGN)) ?>"><i class="icon-angle-right"></i>View All Unassigned</a></li>
                <li><a href="<?php echo url('/order/index',array('status'=>  Order::STATUS_ASSIGN)) ?>"><i class="icon-angle-right"></i>View All Assigned</a></li>
                <li><a href="<?php echo url('/order/index',array('status'=>  Order::STATUS_INPRODUCT)) ?>"><i class="icon-angle-right"></i>View All In Product</a></li>
                <li><a href="<?php echo url('/order/index',array('status'=>  Order::STATUS_COMPLETED)) ?>"><i class="icon-angle-right"></i>View All Delivered</a></li>
                <li><a href="<?php echo url('/order/index',array('status'=>  Order::STATUS_REFUNDS)) ?>"><i class="icon-angle-right"></i>View All Refunded</a></li>
            </ul>
        </li>
        <li class="accordion-group <?php echo $this->activeMenu == 'assign' ? 'active' : ''; ?>">
            <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#assign-nav">
                <i class="icon-user icon-large"></i> Assigned <span class="label label-inverse pull-right">6</span>
            </a>
            <ul class="collapse" id="assign-nav">
                <li><a href="<?php echo url('/assign/index', array('status'=>  Assign::STATUS_WAITING)) ?>"><i class="icon-angle-right"></i>View All Assigned Waiting</a></li>
                <li><a href="<?php echo url('/assign/index', array('status'=>  Assign::STATUS_ACCEPT)) ?>"><i class="icon-angle-right"></i>View All Accepted</a></li>
                <li><a href="<?php echo url('/assign/index', array('status'=>  Assign::STATUS_NOTACCEPT)) ?>"><i class="icon-angle-right"></i>View All Rejected</a></li>
                <li><a href="<?php echo url('/assign/index', array('status'=>  Assign::STATUS_COMPLETED)) ?>"><i class="icon-angle-right"></i>View All Awaiting Approval</a></li>
                <li><a href="<?php echo url('/assign/index', array('status'=>  Assign::STATUS_DELEVERED)) ?>"><i class="icon-angle-right"></i>View All Delivered</a></li>
                <li><a href="<?php echo url('/assign/index', array('status'=>  Assign::STATUS_REFUNDS)) ?>"><i class="icon-angle-right"></i>View All Refunded</a></li>
            </ul>
        </li>
        <li class="accordion-group <?php echo $this->activeMenu == 'user' ? 'active' : ''; ?>">
            <a href="<?php echo url('/user/index') ?>">
                <i class="icon-user icon-large"></i> Customers <span class="label label-inverse pull-right"></span>
            </a>
        </li>
        <li class="accordion-group <?php echo $this->activeMenu == 'admin' ? 'active' : ''; ?>">
            <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#admin-nav">
                <i class="icon-user icon-large"></i> Employees <span class="label label-inverse pull-right">2</span>
            </a>
            <ul class="collapse " id="admin-nav">
                <li><a href="<?php echo url('/admin/index') ?>"><i class="icon-angle-right"></i>View All</a></li>
                <li><a href="<?php echo url('/admin/create') ?>"><i class="icon-angle-right"></i>Add New</a></li>

            </ul>
        </li>

        <li class="accordion-group <?php echo $this->activeMenu == 'report' ? 'active' : ''; ?>">
            <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#report-nav">
                <i class="icon-book icon-large"></i> Reporting <span class="label label-inverse pull-right">2</span>
            </a>
            <ul class="collapse " id="report-nav">
                <li><a href="<?php echo url('/report/index') ?>"><i class="icon-angle-right"></i>All messages</a></li>
                <li><a href="<?php echo url('/report/send') ?>"><i class="icon-angle-right"></i>Send</a></li>
            </ul>
        </li>
        <li class="accordion-group <?php echo $this->activeMenu == 'contact' ? 'active' : ''; ?>">
            <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#contact-nav">
                <i class="icon-envelope icon-large"></i> Contact <span class="label label-inverse pull-right">2</span>
            </a>
            <ul class="collapse " id="contact-nav">
                <li><a href="<?php echo url('/contactus/index') ?>"><i class="icon-angle-right"></i>All messages</a></li>
                <li><a href="<?php echo url('/contactus/send') ?>"><i class="icon-angle-right"></i>Send</a></li>
            </ul>
        </li>
        <li class="accordion-group <?php echo $this->activeMenu == 'cms' ? 'active' : ''; ?>">
            <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#cms-nav">
                <i class="icon-tasks icon-large"></i> Web Content <span class="label label-inverse pull-right">5</span>
            </a>
            <ul class="collapse " id="cms-nav">
                <li><a href="<?php echo url('/node/index', array('type' => 'home')) ?>"><i class="icon-angle-right"></i>Home</a></li>
                <li><a href="<?php echo url('/node/index', array('type' => 'faq')) ?>"><i class="icon-angle-right"></i>Faq</a></li>
                <li><a href="<?php echo url('/node/index', array('type' => 'how')) ?>"><i class="icon-angle-right"></i>How it works</a></li>
                <li><a href="<?php echo url('/node/index', array('type' => 'different')) ?>"><i class="icon-angle-right"></i>Why We’re Different</a></li>
<!--                <li><a href="<?php echo url('/node/index', array('type' => 'page')) ?>"><i class="icon-angle-right"></i>Pages</a></li>-->
                <li><a href="<?php echo url('/emailtemplate/index') ?>"><i class="icon-angle-right"></i>Email template</a></li>
            </ul>
        </li>
        <li class="accordion-group <?php echo $this->activeMenu == 'gallery' ? 'active' : ''; ?>">
            <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#gallery-nav">
                <i class="icon-tasks icon-large"></i> Gallery manager <span class="label label-inverse pull-right">1</span>
            </a>
            <ul class="collapse " id="gallery-nav">
                <li><a href="<?php echo url('/gallery/index', array('id' => 'slider')) ?>"><i class="icon-angle-right"></i>Home page slider</a></li>
<!--                            <li><a href="<?php echo url('/gallery/index', array('id' => 'portfolio')) ?>"><i class="icon-angle-right"></i>Portfolio</a></li>-->
            </ul>
        </li>
        <?php if(user()->getModel()->admin_role==Admin::SUPER_ADMIN):?>
        <li class="accordion-group <?php echo $this->activeMenu == 'setting' ? 'active' : ''; ?>">
            <a data-parent="#menu" data-toggle="collapse" class="accordion-toggle" data-target="#setting-nav">
                <i class="icon-wrench icon-large"></i> Settings <span class="label label-inverse pull-right">9</span>
            </a>
            <ul class="collapse " id="setting-nav">
                <li><a href="<?php echo url('/package/index') ?>"><i class="icon-angle-right"></i>Package Report</a></li>
                <li><a href="<?php echo url('/setting/index', array('type' => 'delivery')) ?>"><i class="icon-angle-right"></i>Delivery</a></li>
                <li><a href="<?php echo url('/setting/index', array('type' => 'site')) ?>"><i class="icon-angle-right"></i>Site settings</a></li>
                <li><a href="<?php echo url('/setting/index', array('type' => 'email')) ?>"><i class="icon-angle-right"></i>Email</a></li>
                <li><a href="<?php echo url('/setting/index', array('type' => 'seo')) ?>"><i class="icon-angle-right"></i>SEO</a></li>
                <li><a href="<?php echo url('/setting/index', array('type' => 'sem')) ?>"><i class="icon-angle-right"></i>SEM</a></li>
                <li><a href="<?php echo url('/setting/index', array('type' => 'paypal')) ?>"><i class="icon-angle-right"></i>Paypal</a></li>
                <li><a href="<?php echo url('/status/index') ?>"><i class="icon-angle-right"></i>Status Orders & Asigned</a></li>
                <li><a href="<?php echo url('/setting/deleteCache') ?>"><i class="icon-angle-right"></i>Clear cache</a></li>
            </ul>
        </li>
        <?php endif;?>
    </ul>
    <!-- END MAIN NAVIGATION -->

</div>
<!-- END LEFT -->

<!-- BEGIN MAIN CONTENT -->
<div id="content">
    <!-- .outer -->
    <div class="container-fluid outer">
        <div class="row-fluid">
            <!-- .inner -->
            <div class="span12 inner">
                <?php echo $content ?>
            </div>
            <!-- /.inner -->
        </div>
        <!-- /.row-fluid -->
    </div>
    <!-- /.outer -->
</div>
<!-- END CONTENT -->
<?php $this->endContent(); ?>